import request from '@/utils/request'

// 查询订单列表
export function listOrder(query)  {
  return request({
    url: `/order/${query.pageNum}/${query.pageSize}`,
    method: 'get'
  })
}

// 查询订单详细
export function getOrder(orderId) {
  return request({
    url: '/order/' + orderId,
    method: 'get'
  })
}

// 新增订单
export function addOrder(data) {
  return request({
    url: '/order/',
    method: 'post',
    data: data
  })
}

// 修改订单
export function updateOrder(data) {
  return request({
    url: '/order/',
    method: 'post',
    data: data
  })
}

// 删除订单
export function delOrder(orderId) {
  return request({
    url: '/order/' + orderId,
    method: 'delete'
  })
}

// 批量删除订单
export function delOrders(orderIds) {
  return request({
    url: '/order/' + orderIds,
    method: 'delete'
  })
}